﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Twi.COMMON.Core;

namespace Twi.DataAccess.OutInterface
{
    public interface IDBHelper
    {
        /// <summary>
        /// 复杂条件分页查询
        /// </summary>
        /// <param name="tableName">表名</param>
        /// <param name="data">json对象</param>
        /// <param name="paging">PagingCondition对象</param>
        /// <example>
        /// ComplexCondition:为ComplexModel的数组，表示有多个条件
        /// json格式：
        /// {
        ///     TableName:"TDuty",
        ///     SelectFields:"FID,FName,FSort", (如果不传，则默认查询所有*)
        ///     OrderFields:'',//不传则表示不排序
        ///     ComplexCondition:[{
        ///         Field:'FName',
        ///         Value:'志',
        ///         COperator:'6',
        ///         JOperator:'0',
        ///         Group:''
        ///     }]
        /// }
        /// </example>
        DataTable GetByComplexCondition(string data, PagingCondition paging = null);
    }
}
